package com.oa.bean;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class WorkPlan {

	private Integer pid;
	private String ptitle;
	private String psetting;
	private Date startTime;
	private Date endTime;
	private String pwheel_id;
	private String partcipant_id;
	private String premark;
	private String pcontent;
	private Integer upost_id;
	private Date pinsertTime;
	private String pstate;
	private String startDate;
	private String stopDate;
	public Integer getPid() {
		return pid;
	}
	public void setPid(Integer pid) {
		this.pid = pid;
	}
	public String getPtitle() {
		return ptitle;
	}
	public void setPtitle(String ptitle) {
		this.ptitle = ptitle;
	}
	public String getPsetting() {
		return psetting;
	}
	public void setPsetting(String psetting) {
		this.psetting = psetting;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		startDate = sdf.format(startTime);
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		stopDate = sdf.format(endTime);
		this.endTime = endTime;
	}
	public String getPwheel_id() {
		return pwheel_id;
	}
	public void setPwheel_id(String pwheel_id) {
		this.pwheel_id = pwheel_id;
	}
	public String getPartcipant_id() {
		return partcipant_id;
	}
	public void setPartcipant_id(String partcipant_id) {
		this.partcipant_id = partcipant_id;
	}
	public String getPremark() {
		return premark;
	}
	public void setPremark(String premark) {
		this.premark = premark;
	}
	public String getPcontent() {
		return pcontent;
	}
	public void setPcontent(String pcontent) {
		this.pcontent = pcontent;
	}
	public Integer getUpost_id() {
		return upost_id;
	}
	public void setUpost_id(Integer upost_id) {
		this.upost_id = upost_id;
	}
	public Date getPinsertTime() {
		return pinsertTime;
	}
	public void setPinsertTime(Date pinsertTime) {
		this.pinsertTime = pinsertTime;
	}
	public String getStartDate() {
		return startDate;
	}
	public void setStartDate(String startDate) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		try {
			startTime = sdf.parse(startDate);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		this.startDate = startDate;
	}
	public String getStopDate() {
		return stopDate;
	}
	public void setStopDate(String stopDate) {
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
		try {
			endTime = sdf.parse(stopDate);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		this.stopDate = stopDate;
	}
	
	public String getPstate() {
		return pstate;
	}
	public void setPstate(String pstate) {
		this.pstate = pstate;
	}
	@Override
	public String toString() {
		return "WorkPlan [pid=" + pid + ", ptitle=" + ptitle + ", psetting=" + psetting + ", startTime=" + startTime
				+ ", endTime=" + endTime + ", pwheel_id=" + pwheel_id + ", partcipant_id=" + partcipant_id
				+ ", premark=" + premark + ", pcontent=" + pcontent + ", upost_id=" + upost_id + ", pinsertTime="
				+ pinsertTime + ", startDate=" + startDate + ", stopDate=" + stopDate + ", getPid()=" + getPid()
				+ ", getPtitle()=" + getPtitle() + ", getPsetting()=" + getPsetting() + ", getStartTime()="
				+ getStartTime() + ", getEndTime()=" + getEndTime() + ", getPwheel_id()=" + getPwheel_id()
				+ ", getPartcipant_id()=" + getPartcipant_id() + ", getPremark()=" + getPremark() + ", getPcontent()="
				+ getPcontent() + ", getUpost_id()=" + getUpost_id() + ", getPinsertTime()=" + getPinsertTime()
				+ ", getStartDate()=" + getStartDate() + ", getStopDate()=" + getStopDate() + ", getClass()="
				+ getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]";
	}
	
	
	
}
